const baseTitle = 'PICC智慧管家'

export function createPageTitleGuard(router:any) {
  router.afterEach((to:any) => {
    const pageTitle = to.meta?.title+' | '+baseTitle
    if (pageTitle) {
      document.title = `${pageTitle}` || `${baseTitle}`
    } else {
      document.title = baseTitle
    }
  })
}
